package com.cskaoyan.javase.overload._2exercise;
/**
 * 方法的重载在Java当中非常常见
 * 比如输出语句
 *
 * @since 17:31
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        System.out.println("123");
        System.out.println(123);
        System.out.println('a');
    }

    // 使用方法重载，控制台输出各种数据类型。
    public static void printElement(byte a){
        System.out.println(a);
    }
    public static void printElement(short a){
        System.out.println(a);
    }
    public static void printElement(int a){
        System.out.println(a);
    }
    public static void printElement(long a){
        System.out.println(a);
    }
    public static void printElement(float a){
        System.out.println(a);
    }
    public static void printElement(double a){
        System.out.println(a);
    }
    public static void printElement(char a){
        System.out.println(a);
    }
    public static void printElement(boolean a){
        System.out.println(a);
    }
    public static void printElement(String a){
        System.out.println(a);
    }
}
